package com.atzon.service.impl;

import com.atzon.DAO.MeetDAO;
import com.atzon.service.MeetService;

import java.util.List;
import java.util.Map;

public class MeetServiceImpl implements MeetService {
    private MeetDAO meetDAO = new MeetDAO();
    @Override
    public void delJoin(Integer uId, Integer cId) {
        meetDAO.delJoin(uId, cId);
    }
    @Override
    public void addJoin(Integer uId, Integer cId) {
        meetDAO.addJoin(uId, cId);
    }
    @Override
    public void turnstu(Integer status,Integer cId) {
        meetDAO.turnstu(status,cId);
    }
    @Override
    public void addMeet(String dept, String title, String content, String start,Integer uId) {
        meetDAO.addMeet(dept,title,content,start,uId);
    }
    @Override
    public long findTotalMeetCount(String search,String dept) {
        return meetDAO.getTotalMeet(search, dept);
    }
    @Override
    public Map<String, Object> findMeetById(Integer meetId) {
        return meetDAO.findMeetById(meetId);
    }
    @Override
    public List<Map<String, Object>> findDept() {
        return meetDAO.findAllDept();
    }
    @Override
    public List<Map<String, Object>> findDeptUser() {
        return meetDAO.findUser();
    }
    @Override
    public List<Map<String, Object>> findMeet(int page, String search, String dept) {
        return meetDAO.findMeet(page, search, dept);
    }
}
